{include 'admin/layout/header_list'}
<link rel="stylesheet" href="__ADMIN_STATIC__/css/addContent.css?random={extendSetting('random')}">
<div class="addcontent">
    <form class="ajaxForm" method="post">
        <input type="hidden" name="_method" value="put">
        <input type="hidden" name="id" value="{if isset($info['id'])}{$info['id']}{/if}">
        <table class="table">
            <tr>
                <td class="tl">
                    <span><strong>* </strong>id</span>
                </td>
                <td>
                    <input class="long" type="text" value="{if isset($info['id'])}{$info['id']}{/if}" disabled>
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span><strong>* </strong>广告名称</span>
                </td>
                <td>
                    <input class="long" type="text" name="name" value="{if isset($info['name'])}{$info['name']}{/if}">
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span><strong>* </strong>广告类型</span>
                </td>
                <td>
                    <p class="article-status">
                        <input name="type" value="1" type="radio" {if isset($info['type']) && $info['type']=="1"}checked{/if} >图片
                    </p>
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span><strong> </strong>广告位</span>
                </td>
                <td>
                    <select name="positionId" class="midium">
                        {if $adManageKeyVal}
                        {foreach $adManageKeyVal $key $val}
                        <option value="{$key}" {if $info} {$info['positionId']==$key ?"selected":""} {/if} >{$val}</option>
                        {/foreach}
                        {/if}
                    </select>
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span><strong> </strong>链接地址</span>
                </td>
                <td>
                    <input class="long" type="text" name="link" value="{if isset($info['link'])}{$info['link']}{/if}">
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span><strong> </strong>排序</span>
                </td>
                <td>
                    <input class="" type="number" name="sortWeights" value="{if isset($info['sortWeights'])}{$info['sortWeights']}{/if}">
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span><strong> </strong>有效期</span>
                </td>
                <td>
                    <input autocomplete="off" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" id="datamin" name="startTime"  class="searchInput lb-input-sm Wdate" style="width:180px;" value="{if isset($info['startTime']) && $info['startTime']}{$info['startTime']}{/if}" >
                    -&nbsp;&nbsp;&nbsp;
                    <input autocomplete="off" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" id="datamax" name="endTime" class="searchInput lb-input-sm Wdate" style="width:180px;" value="{if isset($info['endTime']) && $info['endTime']}{$info['endTime']}{/if}" >
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span><strong> </strong>广告描述</span>
                </td>
                <td>
                    <input class="introduce" type="text" name="description"
                           value="{if isset($info['description'])}{$info['description']}{/if}">
                </td>
            </tr>
            <tr >
                <td class="tl">
                    <span><strong> </strong>广告内容</span>
                </td>
                <td class="webUploadBox" >
                    <input class="long rendercls" name="content1" type="text" value="{if isset($info['content'])}{$info['content']}{/if}">
                    <div class="webUploadFilePicker">选择图片</div>
                    <span class="upload" id="clear">[删除]</span>
                </td>
            </tr>
        </table>
    </form>
    <div class="yifang-button">
        <button class="btns submit ajaxBtn" type="button" data-submit-url="{YIFANG_ROUTE_PREFIX}/adManage" data-form=".ajaxForm" data-location-url="{YIFANG_ROUTE_PREFIX}/adManage/index" data-close="5">
            确认保存
        </button>
        <button class="btns cancel">取消并返回</button>
    </div>
</div>
<script src="__ADMIN_STATIC__/js/addContent.js?random={extendSetting('random')}"></script>
{include 'admin/layout/file_upload_script_auto'}
{include 'admin/layout/footer'}